Astra curved detector - #1729
Conversation
|
There is a bug in this code that I will investigate tomorrow, but because creating pull request threads is down (https://www.githubstatus.com/) can't comment this on the affected line of code. On line 253 in astra_cuda.py: |
|
@NogginBops looks like |
|
I've seemingly fixed the issue. The issue was that the old permutation had order 2 which meant applying the same permutation again returned to the original shape, but the new permutation is order 3 which means applying the same permutation again does not return to the dimentions to the original order. The fix is to introduce explicitly specify the inverse permutation. |
|
@NogginBops sounds reasonable. Thanks a lot for your efforts! I don't see anything wrong with the code, but still need to do a bunch of testing before I can merge it. |
|
Well, this backprojection seems to suggest that at least the axes are correctly mapped:
detector_partition = odl.uniform_partition([-np.pi/8, -160], [np.pi/8, 160], [512, 512])
geometry = odl.applications.tomo.ConeBeamGeometry(
angle_partition, detector_partition, src_radius=200,
det_radius=200, det_curvature_radius=(400, None),
axis=[1, 0, 0])(everything else the same as in ray_trafo_cone_3d). What's strange is that I have to make the detector very "oversized" (so the projection of the actual phantom only takes up a small part of the data space, which would be rather inefficient). If not, then the backprojection comes out heavily cropped on the sides, even though the projection is still well within the detector area:
Not sure if this is because of some actual bug in the code, or I'm just interpreting the results wrong. |


This PR is based on #1634 but remade for odl 1.0.0.
This PR uses
cyl_cone_vecfrom ASTRA 2.4.0 to allow curved cone beam detectors.From #1634 there was a note about a off-by-half bug related to pixel centers that I'm not sure if it still applies.
There is also a FIXME in astra_cuda.py related to not being able to arbitrarily transposing pytorch tensors. Not sure what the best solution for that is, guidance is appreciated. :)This is fixed by usingpermute_dims.@leftaroundabout could you take a look at and see if you can see anything that is obviously wrong that I could fix? You can do a full review when you have time.